changed rounding and made case insensitive