Added Code
Final Modifications and Notes Added

This is a complete function now