refactor(general): change code to align with lecture project