changed clock behavior

*clock and viewClock members of an object which is given as an argument
to the update function
* demonstrated this in the demo