tweaks from knorton