improve composition of pandoc functions