wrapped everything in closures and added use strict mode