move define closer to where it's used