refactored intermission functions