change to return error code 1 when AFF is not present