needz refactor