cleanup initialization routine