added some code for editing added troops