moved handling sources to kernels.cu