updates from class discussion
fixed merge conflicts