There should be some validation to make sure that firstname and lastname exist in the dictionary, otherwise this will break with a key error (either before this function or inside)