updated script for personal use