add masking, use close comparison of floats