cleanup redundant code