changet server loop