Modified api,rb