added configurable read length