def authorRank(authors, lastname, forename, initials):
    """ get the position of a person in an author list, first do first name
        matching, then in a second loop try matching of initials.
    """
    i = 0
    retlist = []
    for a in authors:
        i += 1
        if 'LastName' in a and lastname:
            if 'ForeName' in a:
                if a['LastName'].lower() == lastname.lower() and (forename.
                    lower() in a['ForeName'].lower() or a['ForeName'].lower
                    () in forename.lower()):
                    retlist = [i, a['LastName'] + ' ' + a['ForeName']]
    if len(retlist) > 0:
        return retlist
    i = 0
    for a in authors:
        i += 1
        if 'LastName' in a:
            if 'Initials' in a:
                if a['LastName'].lower() == lastname.lower(
                    ) and initials.lower() in a['Initials'].lower():
                    retlist = [i, a['LastName'] + ' ' + a['Initials']]
    if len(retlist) > 0:
        return retlist
    else:
        return 0, ''
