modified proc.c