changed the methods from using ints to bytes