add shut down functionality