cleaned bpn.c