implemented shutdown tests