added controller logic to catalog controller to make search work