edited display code to have right bit values 2