ch5 exercises - improve tests