wrapped script in main block to avoid running indexing script when importing other functions from file.