added functionality to create CUDA context