refactor and rename a bit