Implemented additional logic for linking