incorporated multidentity rule into distributive rule
fixed minor bug with multiply operation (still needs refining)