Added close call function