merged with minimal wballard changes