refactoring: GetProperty method introduced to eliminate code duplication