added cuda code