Homework 3: better class methods