added defgeneric for value and query