add copy method in Task.java