Working script; requires adjustments
one more update