added some residual stuff