Implementation for outputDict

Still need to test this