last commit before submission
merged the changes with Michaels code