refactor code, add api reference