Added update and stop functions