code simplify