now correctly comparing char[] values