Add tpool.init function