Yes, your new code seems to work. Can you explain what you changed and why?