refactor sources