working functions for link creation