removing reduntant lines in motionevents