modify contractno close function