added repository functions to tables