mainfunction :: input+output :: dictionary :: foreach | working