rewritten in Xtend, make use of 2.6 features