exit method added