add has_delay method to Todo class and correct a source of bug