database stuff all done server side
merged
merged