changed to table, added error if none found