add initCast to js file