file input from command line on algorithm, commenting improved