cast offset to int