Problem 18 and personal preferences on intellij