refactored bytes.lua
refactored length example
added logical example