gradient added
adding drawing optimization for canvas on client side