add error handling for non-binary values