store settings in database