edited code
removed alerts -- debug messages