cleaning up offset code to adjust date offsets