added db stuff again