Made size and count parameters configurable