removing some redundant code