updated and made the script better.