rewrite some uitl function