souce code refactoring