refactoring and add far field