solved with link logic