added data and analytics code