Use method reference instead of lambda
Use unsigned conversion from byte to int