cleanup some redundant code