cleaned up the script