server loop
sort