adjusted for consolidated script