some refactoring as per coderush !

some refactoring as per coderush !