Then David gathered the troops who were with him and appointed unit commanders over thousands and hundreds.