Changing the return type back to a dict