add sceleton got g of r calculation, todo: add normlaization to return function