added formatting functions for compose-mode