implemented compare feature