adding functions for part 2 of assignent