more source refactor