refactor to seperate top level link