sample code for avidlifemedia