split out interactive code