should be ok for homework 6