added save to database