database has inverse relationship. working on saving data