working on server looping