modified Binary class