now stores everything it should in the database