v2.3 implement timeout function