script is now outputting hamlet file