Add flash message to todoitem and fixed bug in new method