refactor + profile