removes redundant self