first pass at making a working version of the homework assignment, likely to be modified after more testing, out fo time for now