remove redundant code