preparing battle loop