added gui part to define start and endpoint