works with StdIn