move getData to common