Add generate urls logic