functions and dictionarys