added support to extract md