moving.Moving: generalize code