using equals method to compare string