manually added Tal's changes to proc.c - working on ex3.2