updating api to use fields instead of methods