work with stdin