Moved dictionary helper function to utils