added ctrl c functionality