code refactoring1