new analytics code and spelling correction