Switched to using intrinsics