move and first lines of code for obstacles