eliminate redundant code