I can help you with that. I did it years ago, but ask me and I can reread the lecture to help you out.