some slight changes and tests