improved MdReader