updated to code from course plus practice code