added new functions to task.py and modified task model