added some cuda code