refactor intrinsics