Functional application

modified the todos example