staticize functions