update method now runs in its own thread.