handler written, subfunctions not, infty loop resolved