implemented mean filter for scan data