added renderBinary function