remove redundancy and sources of errors