adjust scala style in order to compile