implement alert view and fixed some bugs UI