allowing negative number for offset
fixed typo