add gradient clipping to further improve stability