made some changes to my markdown converter function