added write operations to ensure consistent behaviour of OpenCL plus
added some comments