Both functions defined and tests passsing. Needs more documentation.