Attempts for problem 2

Also added headers