First working prototype. Need to define first and last position