ported to xcore 2.0