Add offset option & add some tests