remove io from rust implementation replacing w/ assert