added savetask method