Assignment 3 - Task 6 and 7 (without warrnings)