Completion of the assignment

The functions were created as per the assignment description (see
README.md)