Thanks, nandanm
this worked out with what i wanted.. nice and comprehensive solution.