added that java file for writing databases