fix uid generation, add config