Add doc and change dynamic exec to function dispatch