Added function that runs the exec function