adds a check for len of solutions being the same