strip redundant code