changed duplicate function name

function declared outside of class, causes errors, probably only when both types of
alerts are visible