clean code and logic