added ability to parse links properly