edited draw links functions