Converted everything to CUDA