modified the markdown function