ensure correct ordering