compile equations in advance