minimal todo app logic