clean logic