clean up logic by making some assumptions, move link to the middle