split up parsing functions. still working on the port dictionary.