profilebox refactor