replace "to_app" to "run" and support submapped apps