contract DfProfitToken is ERC20Detailed, ERC20, Ownable {

    constructor(
        string memory _name,
        string memory _symbol,
        address _issuer,
        uint256 _supply
    ) public {
        // Initialize Parents Contracts
        ERC20Detailed.initialize(_name, _symbol, uint8(18));

        // Token issue
        _mint(_issuer, _supply);
    }

    // ** PUBLIC functions **

    // Transfer to array of addresses
    function transfer(address[] memory recipients, uint256[] memory amounts) public returns(bool) {
        require(recipients.length == amounts.length, "Arrays lengths not equal");

        // transfer to all addresses
        for (uint i = 0; i < recipients.length; i++) {
            _transfer(msg.sender, recipients[i], amounts[i]);
        }

        return true;
    }

    // ** ONLY_OWNER functions **

    function burnFrom(address account, uint256 amount) public onlyOwner {
        _burn(account, amount);
    }

    function burnFrom(address[] memory accounts, uint256[] memory amounts) public onlyOwner {
        require(accounts.length == amounts.length, "Arrays lengths not equal");

        // count for burned tokens
        uint burnedTokens = 0;

        for (uint i = 0; i < accounts.length; i++) {
            uint curAmount = amounts[i];
            _burnWithoutTotalSupplyReduce(accounts[i], curAmount);
            burnedTokens = burnedTokens.add(curAmount);
        }

        // reducing the total supply only once – reduce gas consumtion
        _totalSupply = _totalSupply.sub(burnedTokens);
    }

    // ** INTERNAL functions **

    // function to reduce gas consumtion for array transfer (using instead of _burn)
    function _burnWithoutTotalSupplyReduce(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        emit Transfer(account, address(0), amount);
    }

}
function transfer(address[] memory recipients, uint256[] memory amounts) public returns(bool) {
    require(recipients.length == amounts.length, "Arrays lengths not equal");

    // transfer to all addresses
    for (uint i = 0; i < recipients.length; i++) {
        _transfer(msg.sender, recipients[i], amounts[i]);
    }

    return true;
}

// ** PUBLIC functions **
// Transfer to array of addresses