Add offset logic