hallink refactored