added link loading function