filtering fix (avg coordinates calculation)