so before we call this we need to call our factory method to get the data into the database.