added runloop in server instead of process