removed dedundant code