Finished working on a third table, but i dont think it is calculating correctly