todo add something to check config consistency