updated to use new tables