move table function to Util.php; see #28