Move everything inside the function