udpated alert service
udpated and merged the code