cleaning up before packaging