add code to end and remove monitor intervals