extract wrapper
try to wrap js