closing procedure