writing functions to print gpu chain