Have created a function of the minimum required and test code.

Create test code before writing the actual code.