code refactaring