modified counter for alert,added everyloop of check alert
removeauthority ?