'I did what I had to do': Rittenhouse testifies