now accepts js input from stdin