Adding method to executor

I made some changes, please review