added remaining and inflection functions to todos controller