simpler way to save url to database