implementing eventmachine for collecting data