Using ID Mask nodes in Compositor

Hello everyone…
I have created a simple scene with three object, a cube, sphere and a plane, i have assigned glossy shaders to the cube and the sphere.
Now i want to apply a glare filter in the compositor only for the cube not for the sphere. So i have used an ID mask node to arrive at this.
Please find my node setup here.


Since i am a newbie in compositing, i am not sure this is the correct or easy method to apply the compositing filters to a particular object.
Is there a simpler way to do this?

Please throw some light on this, any help would be very much appreciated.

Thank you

Rajasegar

Not sure what that dance with alpha over and subtract is supposed to do (isolate the cube?), but try deleting them and using the set-alpha node instead (it’s under converters). Should get you the result with a lot less mess.

Thanks J_the_Ninja, much appreciated, i have successfully removed one node from the setup, and now it looks a lot better,
here is my node setup now (after removing the alpha over and subtract)