changed alerts polling function