better output generation