finished refactor test pending