adding scheduler run funactionality