Added functions in Task.php