simplify somecodes