removed alert function