extended dynamic query building in jokesController