corrected output on validUrl function