code simplifications