change api corresponding to ruby