added alert function & message