refactor continued2