change implementation to XS