This is fine for now, but we could make this faster by avoiding the temporary.