Made two variables local in order to not spam the global namespace