Added ability to return alternative success code