drawOrigin() function updated