fixed DatabaseAdapter somewhat, but has to be fixed further