rewrite the missed functions