updating to be compatible with CUDA 6