commented and freed memory on cuda