implementing chain module