finished modifying subr.c