improved pycuda model