Fetchval function added