simplify some logic