fromHandle further optimized