hw3p3 nearly working