db java modified to suit md file format