You can find the finished Code attached to this lecture.