Offest calculation done

Signed-off-by: Mishel J <misheljohns@gmail.com>