clean redundant code