clean code and need to fix