cleanred up code and add uialertview
updates to ai