added conditions to render filter field