created constructors for part 2 of exercise