thanks, I'll use the code you've provided, it looks much cleaner.