convert fields to local variable