Nothing wrong with how you did it. Often people come here asking about how to do this, you can give them some guidance.