reduced buffer size from 4096 to 1024