adding jb_binarymatrix; mofication on jb_applyvector