nqp: add routines