add gadget, rewrite