updated to handle phone call interruptions