some minot bgs fixed, simple server loop works!