refactor a part