Basic functionality of exercise 3 implemented