close procedures implemented