Moved the functions around

inverted the functions to see if it helps to fix the website call