Added implementation of exercise2, 1a/b/c
Implemented exercise 2d)