refactor complete / testing not complete