cleaned up script for future writers