refactor + document