removed alert debug in tend()