isbackground
if (isbackground(pr, tp)) {
if (isbackground(pr, tp) &&
while (isbackground(pr, tp) &&
while (isbackground(pr, tp)) {