Added code from first homework.