clean up some redundant code