Add Function and Examples

Final product of Assignment 4