added number of realms to create variable