added better comments and change alert string message