changed way of formatting binary numbers
palette extraction