global variable todo item not working anymore