Delete for loop in acceptHandler