fixing hw3c, need a bit more