rewrite api with grape