removed some redundant code