Implemented 3 failure functions. More testing code is needed.