closed the function