result table creation function added