pull from random url each time and cleaned up code