Project 6 refactored