correct use of function in askAndValidate