added closed and closing