building scripts correctly