Added full functionality to all functions - tests all pass