added fetch  function
trying to dynamically create result table, but failed