added barriers, constrained horizontal motion