Done most but the actual solving method.