added analytics and other stuff