Updated script for personal use.