code refactoring done