allow for input to come directly or from file
better documentation and clearer name