contract IndividuallyCappedCrowdsale is Crowdsale, CappedCrowdsale {
    using SafeMath for uint256;

    mapping(address => uint256) public contributions;
    uint256 public individualCap;
    uint256 public miniumInvestment;

    /**
     * @dev Constructor, takes maximum amount of wei accepted in the crowdsale and minimum limit for individuals.
     * @param _individualCap Max amount of wei that can be contributed by individuals
     * @param _miniumInvestment Min amount of wei that can be contributed by individuals
     */
    constructor(uint256 _individualCap, uint256 _miniumInvestment) public {
        require(_individualCap > 0);
        require(_miniumInvestment > 0);
        individualCap = _individualCap;
        miniumInvestment = _miniumInvestment;
    }


    /**
     * @dev Extend parent behavior requiring purchase to respect the contributor's funding cap.
     * @param _beneficiary Address of contributor
     * @param _weiAmount Amount of wei contributed
     */
    function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view {
        super._preValidatePurchase(_beneficiary, _weiAmount);
        require(_weiAmount <= individualCap);
        require(_weiAmount >= miniumInvestment);
    }
}
/**
 * @title IndividuallyCappedCrowdsale
 * @dev Crowdsale with individual contributor cap and minimum investment limit.
 */
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view {
    super._preValidatePurchase(_beneficiary, _weiAmount);
    require(_weiAmount <= individualCap);
    require(_weiAmount >= miniumInvestment);
}

/**
 * @dev Extend parent behavior requiring purchase to respect the contributor's funding cap.
 * @param _beneficiary Address of contributor
 * @param _weiAmount Amount of wei contributed
 */