added close proc.