genPercept() implementation.