code simplification