change the strairs to end on terrain slope