remove dependency on bufio