rewrite garfield-api