fixed up notifications and error checking