refactoring
removing case of offset being 0