made data handler js.