cleaned up task.js