rewite the farmpollution function