add table function for storage