random url function improved, less broken images