Move sample code to utils api