working on eq function chap 7