reformating (not scala style)