simpler movement scheme, old code is in comment at bottom