Updated to use new eqaution.m