refactors run lambda to app var