prevent script from being run multiple times