var set as local var, code clean up