little bit of stuff for saving the subject objects to the sql database