discovered a bug related to the annoying fact java does not allow unsigned bytes. it's fixed