typcasted proc to struct* in main.c