added setting and displaying result