public boolean accountExists(String name) {
        for (Account a : accounts) {
            if (a.owner.equals(name)) {
                return true;
            }
        }
        return false;
    }