refactored property change listener.