Updated script following testing.