offset should be set as zero if options is undefined