cleaning up procedure