added buffering to router input, and a test script for timing