improves url validation