making this script more useful