exam problem 5 basic logic improved

still not working.