modify so i can use this script in another dir