preping to add apple sample code that I've tweaked