refinement for getting data