improving interface and adding some CUDA