changed to static and increased buffer sizes