draft of sample code