Second assignment: two functions made