code refactoting