intermediary script working