Created function #5

Created function 5 and verified its functionality.