implement formatting