implement todo sample code