minor changes
fixed global var: data