filling out some of the functions, currently reconsidering error handling--would it be clear if I threw and caught exceptions?