Porting over additon and multiplication from previous attempt