contract HoldersList is Ownable{
   uint256 public _totalTokens;
   
   struct TokenHolder {
        uint256 balance;
        uint       regTime;
        bool isValue;
    }
    
    mapping(address => TokenHolder) holders;
    address[] public payees;
    
    function changeBalance(address _who, uint _amount)  public onlyOwner {
        
            holders[_who].balance = _amount;
            if (notInArray(_who)){
                payees.push(_who);
                holders[_who].regTime = now;
                holders[_who].isValue = true;
            }
            
        //}
    }
    function notInArray(address _who) internal view returns (bool) {
        if (holders[_who].isValue) {
            return false;
        }
        return true;
    }
    
  /**
   * @dev Defines number of issued tokens. 
   */
  
    function setTotal(uint _amount) public onlyOwner {
      _totalTokens = _amount;
  }
  
  /**
   * @dev Returnes number of issued tokens.
   */
  
   function getTotal() public constant returns (uint)  {
     return  _totalTokens;
  }
  
  /**
   * @dev Returnes holders balance.
   
   */
  function returnBalance (address _who) public constant returns (uint){
      uint _balance;
      
      _balance= holders[_who].balance;
      return _balance;
  }
  
  
  /**
   * @dev Returnes number of holders in array.
   
   */
  function returnPayees () public constant returns (uint){
      uint _ammount;
      
      _ammount= payees.length;
      return _ammount;
  }
  
  
  /**
   * @dev Returnes holders address.
   
   */
  function returnHolder (uint _num) public constant returns (address){
      address _addr;
      
      _addr= payees[_num];
      return _addr;
  }
  
  /**
   * @dev Returnes registration date of holder.
   
   */
  function returnRegDate (address _who) public constant returns (uint){
      uint _redData;
      
      _redData= holders[_who].regTime;
      return _redData;
  }
    
}
function setTotal(uint _amount) public onlyOwner {
      _totalTokens = _amount;
  }
/**
 * @dev Defines number of issued tokens. 
 */