added before filter on saving data