added function to save property to database