some refactoring in customer section