refactor the global Canopsis var