added getchunks method, fixed some comments