updated grid movement to be more stable