script now works