regularised things a bit
translation of Tijs' Dart code to Xtend