Clean code putting in one function. Optimize conditions