function withdraw(uint units) external {
    require(deposits[msg.sender].balance >= units, "Insufficient balance");
    require(deposits[msg.sender].lockedUntil < block.timestamp, "Deposit locked");
    deposits[msg.sender].balance = deposits[msg.sender].balance.sub(units);
    token.transfer(msg.sender, units);
  }