sample code of tyrus