adapted to new xtend version