unique solution detection
passes R CMD check