edited display code to have right bit values