tidy up example and formatting