ok .. i have refactored it .. don't really like the result .. but i guess it will solve your concerns