use createAlert function