encapsulated exec in a wrapper class/function