Slight changes to code
moved to assigned lines