small server change

added functions for saving to database