API rewrite trial and error