rewriting binary table class