using normal io instead of bufio