implemented offset and limit