wrote hqr.c