adding end-script markers
removing and debuggin