added functionality to exec