tweaked the tinytocs part