put in a timer. has more problems
Fixed shared object state and other small bugs