Ported example to Xtend