creating groups and assigning rights at list level

Hi so I am trying to string together a script that does the following:

1. creates a list within a site collection

2. Removes all inherited permissions

3. Creates 3 groups at the list level (group name: listname_read, listname_edit, listname_owner) and assigns them rights (read, edit, owner)

I have been able to accomplish 1 & 2 but not 3. 

I am by no means any kind of PS expert, what I have atm is from stringing together scripts off the net.

Can you please help me complete my script and acheive part 3 above? here is what I have so far:

function new-SPOnlineList {
#variables that needs to be set before starting the script
$siteURL = "https://***"
$adminUrl = "https://***"
$userName = "[email protected]***"
$listTitle = Read-Host "Please enter the name for the doc library"
$listDescription = $listTitle
$listTemplate = 101

# Let the user fill in their password in the PowerShell window
$password = Read-Host "Please enter the password for $($userName)" -AsSecureString

# set SharePoint Online credentials
$SPOCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName, $password)

# Creating client context object
$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL)
$context.credentials = $SPOCredentials

#create list using ListCreationInformation object (lci)
$lci = New-Object Microsoft.SharePoint.Client.ListCreationInformation
$lci.title = $listTitle
$lci.description = $listDescription
$lci.TemplateType = $listTemplate
$list = $context.web.lists.add($lci)
#send the request containing all operations to the server
write-host "info: Created $($listTitle)" -foregroundcolor green
write-host "info: $($_.Exception.Message)" -foregroundcolor red

#Load list and break inheritance
$web = $context.web.Lists.GetByTitle($ListTitle)
$web.breakroleinheritance($false, $false)
#send the request containing all operations to the server
write-host "info: Broken inheritance for $($web.title)" -foregroundcolor green
write-host "info: $($_.Exception.Message)" -foregroundcolor red



Thanks alot!!