buffer size changed to 1024