clean up sup code