refactored input and output dictionaries