Pulled setting up filters to its on function and called it only once