get rid of some redundant code