def getFromDict(dict, key, default):
    """ get value by key
    returns the value in dict or default value if no key in dict
    """
    if key in dict:
        return dict[key]
    else:
        return default