function declaration did not match