refactor jebeapi