slight changes modifications made