refactor + api update