added type signature for PartTwo functions