trailing zeros are generated by format not replace
server loop implemented