refactoring code
merging changes