proper memory handling inside the GPU is solved