removed reduntant code