they returned to lima and accompanied the president gamarra in the campaign against bolivia