clean up maintenance and added alert function