See the script here. Know a better way to do this? Please tell me.