added global 'w' world pointer