chainjs before api implementaion;