change api to use grape