implementing formatter for gmp module