updated gradu for output