changed db stuff and endpoints