add use strict and remove log function