built loop and removed events