Simplify logic