code refactorying