fix issue #30 exec is now a private function