thanks for your help...yesterday i have done some R&D and written the very simple code to solve this problem