seperated script from routes