changed getTodo to nonblocking