made some changes to match lessonwell code