rewrite(use function)