use boolean return values instead of FAIL and 0