add common alert method