rewrite add/remove/toggle/transferroutefunction