Ported some methods to XS