Add function to limit the number of results (pagination)