add some clean code refactorizations