within function

I've just put in this pull request to continue discussion on https://github.com/andrew/node-xbox-controller/issues/10, its not fully tested so I wouldn't merge just yet