simplify moving code