removed all redundant code