#12-1
optimise the move to function