rework to conform to API docs