improved message printing