add result calculation to answer
restructure db to avoid unnecessary join tables