When you think back on your teen age years, ponder why you would never talk back to your parents in a rude manner...what would they have done to you? Then ask yourself what you do different that would result in your daughter feeling she could get away with it. We also use the writing essays as part of a grounding disapline system, and it really works well.
I've got to say that is an awesome punishment I am 22 and have very young kids but I it hasn't been too long since I was a teen to know that would have made me shut up and not talk to my mom like that. Inever did do that but I did have a sassyness to me that got me in trouble so I'd say you did the best thing ever.