initial threads & input stream