pass by reference instead of value of OpenCL objects
changed more to pass by reference instead of pass by value