moved master script into library