+added shutdown and update functions