added a quit function at start/end position prompts.