a simple but useful bpnn  class