modified vislab code