working mostly except for binary fn test