added db stuff, not working yet