added alert views and got everything to work correctly