befor saving results