created todoFactory
moved functions to factory