adapted offset and limit