cut out hw2-specific functions