now using solution factories in core algorithm