Worked on equal function