try to add test for alert and max