changed the blocksize to cidr for simplification.
pepified most of this.