added reference functionality to smartscan.