Assignment2 Functions.