added dictionary look up and output