Assignment completed!

Implemented both functions!