adding in GetElements function