Added function to handle multiple troops