added if check around monitoring and removed whitespace