delete redundant code