removed parts of residual code