remove some redundant code