Version 1, can be provided an argument or read from stdin