Made genMessage more concise