add support for negative offsets