close functions added