rewrite register task