added prob12 and get_factors function and tests