Trying to generalize the executor class