improved Binary class