destory function was added