Hi Steve,
Welcome to our community! 
Unfortunately, your code is really hard to read for me because it is not formatted. Apart from that, given I didn’t miss anything, it looks fine to me. 
See also:
- Forum User Guides : How to apply code formatting within your post
- Forum User Guides : How to mark a topic as solved