updates to script
cleanup code
cleanup code