use strict for wrapper
fix undeclared variables