moved suffix generation before DOM as it requires suffix