better alerts; tests