Retrofit script into main function