added function variables to resolve strict errors in august
undid changes
fixed strict errors