another exercise, specializing the last one to bool