cleaned up some redundant code