Addressed Eric's comments.
changed back to return type dictionary for now.