changed to allow input from argument