better implementation for is_xs (rafl++)