slight changes and bug fixes