changed GPU code