Single Thread Version

Fulfilled requirement for single thread server.
Buggy when requests are frequent and fast.