modified design, saves changes on keyboard interrupt