moved some methods to private object
format messages