ensure proper ordering