#4 refactor skeleton code into class