good for tonight. more refactoring tom