contract TokenTransferHelper is StandardToken, Ownable {
    event Pause();
    event Unpause();
    event Mint(address indexed to, uint256 amount);
    event MintFinished();
    event Burn(address indexed burner, uint256 value);

    bool public paused = true;
    bool public mintingFinished = false;

    mapping (address => bool) public isLock;

    modifier canMint() {
        require(!mintingFinished);
        _;
    }

    modifier hasMintPermission() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() public onlyOwner {
        require(!paused);
        paused = true;
        emit Pause();
    }

    /**
     * @dev called by the owner to resume, returns to normal state
     */
    function resume() public onlyOwner {
        require(paused);
        paused = false;
        emit Unpause();
    }

    function transfer(address _to, uint256 _value) public returns (bool) {
        if(msg.sender != owner) {
            require(!paused);
        }
        require(!isLock[msg.sender]);
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        if(msg.sender != owner) {
            require(!paused);
        }
        require(!isLock[msg.sender]);
        return super.transferFrom(_from, _to, _value);
    }

    function approve(address _spender, uint256 _value) public returns (bool) {
        if(msg.sender != owner) {
            require(!paused);
        }
        return super.approve(_spender, _value);
    }

    function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
        if(msg.sender != owner) {
            require(!paused);
        }
        return super.increaseApproval(_spender, _addedValue);
    }

    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
        if(msg.sender != owner) {
            require(!paused);
        }
        return super.decreaseApproval(_spender, _subtractedValue);
    }

    function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) {
        totalSupply_ = totalSupply_.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Mint(_to, _amount);
        emit Transfer(address(0), _to, _amount);
        return true;
    }

    /**
     * @dev Function to stop minting new tokens.
     * @return True if the operation was successful.
     */
    function finishMinting() public onlyOwner canMint returns (bool) {
        mintingFinished = true;
        emit MintFinished();
        return true;
    }

     /**
     * @dev Burns a specific amount of tokens.
     * @param _value The amount of token to be burned.
     */
    function burn(uint256 _value) public {
        _burn(msg.sender, _value);
    }

    /**
     * @dev Burns a specific amount of tokens from the target address and decrements allowance
     * @param _from address The address which you want to send tokens from
     * @param _value uint256 The amount of token to be burned
     */
    function burnFrom(address _from, uint256 _value) public onlyOwner {
        _burn(_from, _value);
    }

    function _burn(address _who, uint256 _value) internal {
        require(_value <= balances[_who]);
        balances[_who] = balances[_who].sub(_value);
        totalSupply_ = totalSupply_.sub(_value);
        emit Burn(_who, _value);
        emit Transfer(_who, address(0), _value);
    }

    function lockAccount(address _to) public onlyOwner returns (bool) {
        isLock[_to] = true;
        return true;
    }

    function unLockAccount(address _to) public onlyOwner returns (bool) {
        isLock[_to] = false;
        return true;
    }
}
/**
 * @title Pausable token
 * @dev StandardToken modified with pausable transfers.
 **/
function pause() public onlyOwner {
        require(!paused);
        paused = true;
        emit Pause();
    }
/**
 * @dev called by the owner to pause, triggers stopped state
 */