A bank loaned out 12,000 dollars, part at the rate of 8 percent per year and the rest at the rate of 18 per year. If the interest received totalled 1000 dollars, how much was loaned at 8 percent?

Let x = amount of loan at 8 percent

(12,000- x)(0.08) + (12,000)(0.18) = 1000

Is this the correct equation?