initialise return variable, and reverse test causing matches to not match