almost have Chain initialization on gpu worked out