reformatting code
code tidy  and refactoring