working generic retrieve task;