Fixed def and indent for close. Everything seems to work.H