added function to fetch tasks. removed sample code from main.js