Started developing the generatDomain() function