more cleanup code