clean up code: now you can switch between local and server url in the functions.py