How do you use the word afterwards in a sentence?

I chose Bill for our team, but afterwards I wished I had chosen Bob instead.

I went to get my hair cut, and afterwards I stopped for some ice cream.