compare 2 strings correctly