To compare and search functions