add print total_in_list() at begin of handleConnect()