update if.c to not hardcode variable