a small server engine code, just for fun