add join to make server stopable
just finish initial version