simplified code, added clear confirm