initial import, based on Google sample.