added entry sampling
minor formating fixes
rounded up expanded format to multiplicity of 8 bits