database mode of operation + fixes