refactoring markdown; code broken