Worked on function (still somewhat in progress) and found an error with
multiplication operations that still needs to be fixed.