removed some redundant code.