added state info to bgproc struct