reduced number of state variables from 256 to 16