removed alert and some commented code