moved script call around