add support for initialization of stdin buffer