lecture 4 + project refactoring