use stack as a parameter to run scheduler